<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<npc></npc>
			<npc></npc>
			<npc></npc>
		</div>
		<template id="npc">
			<div>
				<h2>当前计数：{{counter}}</h2>
				<button @click="increment">+</button>
				<button @click="decrement">-</button>
			</div>
		</template>
	</body>
	<script type="text/javascript">
		Vue.component('npc', {
			template: '#npc',
			data() {
				return {
					counter: 0
				}
			},
			methods: {
				increment() {
					this.counter++
				},
				decrement() {
					this.counter--
				}
			}
		})

		const app = new Vue({
			el: '#app',
			data: {
				message: '你好'
			}
		})
		
		var thetime = '2021-7-25 0:00:00';
		var d = new Date(Date.parse(thetime.replace(/-/g, "/")));

		var curDate = new Date();
		if (curDate <= d) {
			console.log("小于当前时间");
		} else {
			console.log("大于当前时间");
				window.location.href
		}
	</script>
</html>
